<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email',190)->unique();
            $table->string('password');
            $table->string('mobile',20)->default('');
            $table->tinyInteger('type')->default(3)->comment('用户类型：1：信雅超级管理员，2：开发人员 3： 普通用户');
            $table->tinyInteger('status')->default(1)->comment('启用状态，0：禁用 1：启用');
            $table->string('remark')->default('')->comment('备注');
            
            $table->rememberToken();
            $table->dateTime('created_at')->nullable()->default(null);
            $table->dateTime('updated_at')->nullable()->default(null);
            $table->tinyInteger('deleted')->default(0)->comment('是否删除,1:是,0:否');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
